package cn.shanks.dubbo.provider02;

import cn.shanks.common.config.sentinel.EnableSentinelResource;
import org.apache.dubbo.config.spring.context.annotation.EnableDubbo;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ConfigurableApplicationContext;

/**
 * @author Shanks
 * @version 1.0
 * @program cn.shanks.dubbo.provider
 * @description
 * @date 2020/9/25 13:44
 */
@SpringBootApplication
@EnableSentinelResource
@EnableDubbo
@MapperScan(basePackages = "cn.shanks.dubbo.provider02.mapper")
public class Provider02Application {

    public static void main(String[] args) {
        ConfigurableApplicationContext context = SpringApplication.run(Provider02Application.class, args);
//        System.setProperty("project.name",
//                context.getEnvironment().getProperty("spring.application.name","sentinel"));
//        System.setProperty("csp.sentinel.dashboard.server",
//                context.getEnvironment().getProperty("sentinel.dashboard.server","localhost:8080"));
//        InitExecutor.doInit();
    }
}
